<div class="rightmenu">


    <?php
echo _media('logo1.png')->width(200);
    function getChild($root) {
        echo _open('ul')  ;

        foreach ($root->getNode()->getChildren() as $node) {

            echo _open('li.child_li')  ;
            echo _link($node)->text(_tag('strong',$node->name));
            echo _close('li');
        }
        echo _close('ul');


    }
    echo _open('ul#theMenu');
    foreach ($treeObject->fetchRoots() as $root) {

        echo _open('li.parent_li')  ;

        if($root->getNode()->getChildren()) {

            echo $root->name;
            getChild($root);

        }else {
            echo _link($root)->text($root->name) ;
        }
        echo _close('li');

    }
    echo _close('ul');

    ?>

</div>